473,419 Members | 1,594 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

Validations to be considered for writing script for date of birth in a form

i need your help for writing javascript for date of birth.in dis we are using seperate drop down menus for date,month and year.....so wat are d validations to b considered 2 overcome dis.......
Mar 31 '07 #1
4 3779
AricC
1,892 Expert 1GB
i need your help for writing javascript for date of birth.in dis we are using seperate drop down menus for date,month and year.....so wat are d validations to b considered 2 overcome dis.......
If you are getting the values from drop downs then you shouldn't have too much too worry about. Dont give them the option for dates that you know possibly couldn't be reasonable like 01/01/1901 unless you have some really old people visiting your page.
Mar 31 '07 #2
This is the html code i hav used for the date of birth
now my aim is that when v submit the form the date,month and year fields
should not be empty
can u plz provide me the necessary function
i mean script
thanq






Date of Birth :
<select name="month" autocomplete="off" class="text" id="dateofbirth" >
<option selected="selected">Jan</option>
<option>Feb</option>
<option>Mar</option>
...........................
</select>
<select name="date" autocomplete="off" class="text" id="dateofbirth" >
<option selected="selected">1</option>
<option>2</option><option>3</option>
............................</select>
<select name="year" autocomplete="off" class="text" id="dateofbirth" >
<option selected="selected">1955</option><option>1956</option><option>1957</option>
.....................................
</select>
Mar 31 '07 #3
acoder
16,027 Expert Mod 8TB
This is the html code i hav used for the date of birth
now my aim is that when v submit the form the date,month and year fields
should not be empty
can u plz provide me the necessary function
i mean script
thanq
Check out these tutorials/articles:
Form Validation- Apple
Form Validation - W3Schools
Form Validation - doing it right
Apr 2 '07 #4
acoder
16,027 Expert Mod 8TB
Also check this date validation script.
Apr 2 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

20
by: Gav | last post by:
I have a database with date of births stored dd/mm/yyyy (english dating system) and =date() returns a date in the same format in my server. how do i find the persons age using these two pieces of...
2
by: anil kumar via .NET 247 | last post by:
(Type your message here) hi, i am using save & cancel webform button my webpage to with somevalidations , when i am trying to save my content it is savedthat time i need a popup msg like ur 'data...
1
by: Anup | last post by:
In my form I and doing validations using 'Javascript' as I m using ASP1.1 and there is very less support for Validators there. //Code Behind private void Page_Load(object sender,...
7
by: php newbie | last post by:
I am creating a form Form1.php that posts to the another form Form2.php. I have input validations on the first form. I need the user to go to the next form ONLY if the inputs from the user are...
7
by: Naha | last post by:
Hi guys, I have a problem, can someone help me? I'm not sure why but none of my validation functions are working!!!! <html>
2
by: prakashsurya | last post by:
Hello I am going through the validations in a form I would like to know the validations to be considered in writing javascript for email id so would u plz help me in writing the necessary...
2
by: Matuag | last post by:
Hi All, I am trying to create a form which can calculate with Age and Birth Date fields. I want Age to be calculated based on Birth Date (which I managed to do) but at the same time if Birth...
3
by: jamieharrop | last post by:
Afternoon all, I've been battling with this all day today and my brain is now pretty much fried. I have one table that lists several details about my customers (name, address, phone, date of...
2
by: swethak | last post by:
hi , i write the code in .htm file. It is in cgi-bin/searches/one.htm.In that i write a form submitting and validations.But validations are not worked in that .htm file. I used the same code in my...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.